VLOOKUP
VLOOKUP is a function that searches for a value in the first column of a table and returns a value in the same row from a specified column. It is commonly used to look up data in large datasets.
Syntax
VLOOKUP(lookup_value, table_array, col_index_num, approximate_match)
Arguments
lookup_value
: The value to search for in the first column of the table.table_array
: The range of cells that contains the data. The first column of this range is where the function will search for the lookup_value.col_index_num
: The column number in the table_array from which to retrieve the value. The first column is 1, the second column is 2, and so on.approximate_match
: Optional. A logical value that specifies whether to find an exact match or an approximate match. If TRUE or omitted, an approximate match is returned. If FALSE, VLOOKUP will only find an exact match. Default false.
Example
VLOOKUP("Product A", A1:C10, 2) → Returns the value from the second column of the row where "Product A" is found in the first column of the range A1:C10.
VLOOKUP(A1, B1:D10, 3) → Returns the value from the third column of the row where the value in cell A1 is found in the first column of the range B1:D10, using approximate match.